import re

res = re.compile('industr(?:y|ies)')

# 密码规则：必须包含数字、英文字母、特殊符号且大于等于8位（特殊符号包括: ~!@#$%^&*）
pw_res = re.compile('^(?=.*\d)(?=.*[a-zA-Z])[\da-zA-Z~!@#$%^&*]{8,}$')
tel_res = re.compile('^(?:\+?86)?1(?:3\d{3}|5[^4\D]\d{2}|8\d{3}|7[^0129\D](?<=4)(?:0\d|1[0-2]|9\d)|\d{2}|9[189]\d{2}|66\d{2})\d{6}$')
s = 'industry'
pw = 'affsa45s!#@!#'
tel = '13567864556'
# a = res.search(s).group()
# print(a)
# a = pw_res.search(pw)
a = tel_res.search(tel)
if a:
    print('符合规则')
else:
    print('error')